import axios from "@/axios"

// 查询学习进度
async function getProgress(): Promise<any> {
    const res = await axios.get("/progress/get");
    return res.data;
}

// 增加 mastered 项
async function addMastered(masteredItem: any): Promise<any> {
    const res = await axios.post("/progress/addMastered", { masteredItem });
    return res.data;
}

// 设置 now 字段
async function setNow(nowItem: any): Promise<any> {
    const res = await axios.post("/progress/setNow", { nowItem });
    return res.data;
}


// 查询ai建议
async function getAiProgress(): Promise<any> {
    const res = await axios.get("/progress/guidelines");
    return res.data;
}

export default {
    getProgress,
    addMastered,
    setNow,
    getAiProgress,
};